package com.lovo.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.lovo.bean.SysOrder;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * <p>
 * ????? 服务类
 * </p>
 *
 * @author lovo
 * @since 2022-09-17
 */
public interface ISysOrderService extends IService<SysOrder> {

    /**
     * 根据userId分页查询该用户所有订单信息
     *
     * @param pageNO 页码
     * @param userId 用户编号
     * @return 分页对象
     */
    IPage<SysOrder> findAllOrderByUserId(Integer pageNO, Integer userId);


    public boolean buyCar(Integer userId, Integer addressId, String buyType);

    public boolean addOrder(Integer userId, Integer addressId, String buyType,Integer productId, Integer num);

}
